package com.example.springbootmybatisplus.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.springbootmybatisplus.annotation.SensitiveField;
import com.example.springbootmybatisplus.mj.Status;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author lfh
 * @since 2022-11-19
 */
@Getter
@Setter
@Builder
@TableName("tbl_user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 姓名
     */
    @TableField("name")
    private String name;

    /**
     * 年龄
     */
    @TableField("age")
    private Integer age;

    /**
     * 邮箱
     */
    @TableField("email")
    private String email;

    /**
     * 电话
     */
    @TableField("phone")
    // @Pattern(regexp = "^(1[3-9]\\\\d{9})$")
    // @NotBlank
    private String phone;

    /**
     * 是否删除--0未删除--1已删除
     */
    @TableField("deleted")
    private Integer deleted;

    // @TableField("sex")
    // private Status sex;
}
